package com.ymttest.database.sqlwapper.shenqisettlement;

import java.util.List;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.shenqisettlement.CurrencyConfig;

public class CurrencyConfigWrapper {
	
	SqlManager manager;

    public CurrencyConfigWrapper() {
        manager = new SqlManager("shenqisettlement");
    }
    
    @SuppressWarnings("unchecked")
	public CurrencyConfig selectByPrimaryKey(String currency) {
    	
    	CurrencyConfig currencyConfig = null;
    	
    	List<CurrencyConfig> result = manager
                .getSelectResults(
                        "com.ymttest.database.mapping.shenqisettlement.CurrencyConfigMapper.selectByPrimaryKey",
                        currency);
        manager.commit();
        
		if (result.size() == 0) {
			Logger.comment("currency_config没有数据");
		}
		else 
			currencyConfig = result.get(0);
		
		return currencyConfig;
    }
    
    public static void main(String[] args) {
    	CurrencyConfigWrapper wrapper = new CurrencyConfigWrapper();
    	Logger.debug(wrapper.selectByPrimaryKey("USD").getIs_support_decimal_places());
    }
}
